ReactNative Imageコンポーネントはwidth, heightを指定しないと表示されない
概要
タイトル通りだが<Image />を利用する際、widthとheightを設定してあげないと表示されないよ。
例えば以下のような記載だと画像が表示されない
code: sample.ng.js
import { Image } from 'react-native';
...
<Image source={require('./sample.png')} />
...
ちゃんとstyleで縦と横の長さを設定する
code: sample.ok.js
import { Image } from 'react-native';
...
<Image style={{width: 60, height: 50}} source={require('./sample.png')} />
...
参考